package com.nuoniu.sibanyun.entity.erp.barcode;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.nuoniu.sibanyun.common.BaseEntity;
import com.nuoniu.sibanyun.entity.so.VAreaCalculationDetail;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * ERP非标 出入库主表
 * </p>
 *
 * @author 白强
 * @since 2021-11-30
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("erp_ns_in_out_main")
@ApiModel(value="ErpNsInOutMain对象", description="ERP非标 出入库主表")
public class ErpNsInOutMain extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "租户ID")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "账套id")
    @TableField("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "数据来源（发货单 等等）")
    @TableField("data_source")
    private String dataSource;

    @ApiModelProperty(value = "单据编码")
    @TableField("voucher_code")
    private String voucherCode;

    @ApiModelProperty(value = "单据日期")
    @TableField("voucher_date")
    private LocalDate voucherDate;

    @ApiModelProperty(value = "单据状态")
    @TableField("voucher_state")
    private Integer voucherState;

    @ApiModelProperty(value = "客户ID")
    @TableField("crm_id")
    private Integer crmId;

    @ApiModelProperty(value = "客户名称")
    @TableField("crm_name")
    private String crmName;

    @ApiModelProperty(value = "客户编码")
    @TableField("crm_code")
    private String crmCode;

    @ApiModelProperty(value = "项目id")
    @TableField("project_id")
    private Integer projectId;

    @ApiModelProperty(value = "项目名称")
    @TableField("project_name")
    private String projectName;

    @ApiModelProperty(value = "项目编码")
    @TableField("project_code")
    private String projectCode;

    @ApiModelProperty(value = "是否质检")
    @TableField("is_examine")
    private Boolean isExamine;

    @ApiModelProperty(value = "检验员ID")
    @TableField("examine_user_id")
    private Integer examineUserId;

    @ApiModelProperty(value = "检验员姓名")
    @TableField("examine_user_name")
    private String examineUserName;

    @ApiModelProperty(value = "检验单号")
    @TableField("examine_no")
    private String examineNo;

    @ApiModelProperty(value = "检验日期")
    @TableField("examine_date")
    private LocalDate examineDate;

    @ApiModelProperty(value = "部门ID")
    @TableField("office_id")
    private Integer officeId;

    @ApiModelProperty(value = "部门名称")
    @TableField("office_name")
    private String officeName;

    @ApiModelProperty(value = "部门编码")
    @TableField("office_code")
    private String officeCode;

    @ApiModelProperty(value = "经办人ID")
    @TableField("charge_user_id")
    private Integer chargeUserId;

    @ApiModelProperty(value = "经办人名称")
    @TableField("charge_user_name")
    private String chargeUserName;

    @ApiModelProperty(value = "收货人")
    @TableField("consignee")
    private String consignee;

    @ApiModelProperty(value = "收货地址")
    @TableField("receiving_address")
    private String receivingAddress;

    @ApiModelProperty(value = "送货日期")
    @TableField("delivery_date")
    private LocalDateTime deliveryDate;

    @ApiModelProperty(value = "批次")
    @TableField("batch")
    private String batch;

    @ApiModelProperty(value = "制单ID")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "制单人姓名")
    @TableField("create_user_name")
    private String createUserName;

    @ApiModelProperty(value = "制单日期")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "审核人ID")
    @TableField("reviewer_user_id")
    private Integer reviewerUserId;

    @ApiModelProperty(value = "审核人姓名")
    @TableField("reviewer_user_name")
    private String reviewerUserName;

    @ApiModelProperty(value = "审核日期")
    @TableField("reviewer_date")
    private LocalDate reviewerDate;

    @ApiModelProperty(value = "总数量")
    @TableField("total_quantity")
    private BigDecimal totalQuantity;

    @ApiModelProperty(value = "累计执行数量")
    @TableField(exist = false)
    private BigDecimal cumExecuteQuantity;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "自定义字段数据")
    @TableField("define_fields")
    private String defineFields;

    @ApiModelProperty(value = "来源单id")
    @TableField("source_voucher_id")
    private Integer sourceVoucherId;

    @ApiModelProperty(value = "来源单号")
    @TableField("source_voucher_code")
    private String sourceVoucherCode;

    @ApiModelProperty(value = "来源日期")
    @TableField("source_voucher_date")
    private LocalDate sourceVoucherDate;

    @ApiModelProperty(value = "来源单据")
    @TableField("source_voucher_type")
    private String sourceVoucherType;

    @ApiModelProperty(value = "单据明细")
    @TableField(exist = false)
    private List<ErpNsInOutDetail> orderDetailList;


}
